package cz.najman.emdroid.provider;

/**
 * Interface containing useful flags that can be set to each database row
 * @author Lukas Najman
 *
 */
public interface Flags {

	/**
	 * Column which indicates current state of the particular database row
	 * The states are: POSTING (1), UPDATING (2), DELETING (3), NONE (0) 
	 */
	public static final String STATE_FLAG = "state_flag";
	
	/**
	 * Value of the STATE_FLAG, indicating, there is currently
	 * <b>posting</b> process going on over this particular resource/row
	 */
	public static final int STATE_POSTING = 1;
	
	/**
	 * Value of the STATE_FLAG, indicating, there is currently
	 * <b>updating</b> process going on over this particular resource/row
	 */
	public static final int STATE_UPDATING = 2;
	
	/**
	 * Value of the STATE_FLAG, indicating, there is currently
	 * <b>deleting</b> process going on over this particular resource/row
	 */
	public static final int STATE_DELETING = 3;
	
	/**
	 * Value of the STATE_FLAG, indicating, there is currently 
	 * <b>no</b> process going on over this particular resource/row
	 */
	public static final int STATE_NONE = 0;
	
	/**
	 * Column indicating the result of the last operation executed
	 * on the particular resource/row
	 */
	public static final String RESULT_FLAG = "result_flag";
	
	/**
	 * Value of the RESULT_FLAG indicating that last operation executed
	 * on the particular resource/row was <b>successful</b>
	 */
	public static final int RESULT_OK = 1;
	
	/**
	 * Value of the RESULT_FLAG indicating that last operation executed
	 * on the particular resource/row was <b>unsuccessful</b>
	 */
	public static final int RESULT_FAIL = -1;

	/**
	 * Column representing time of the last update of the particular resource/row
	 */
	public static final String TIMESTAMP = "timestamp";	
	
	public static final String REMOTE_ID = "remote_id";
	
}
